home *** CD-ROM | disk | FTP | other *** search
- #!/bin/bash
- # This script should do all the neccesary steps to compile Ptolemy from scratch
- #
- # This script works with original Slackware 3.0
- # with the patches described in the INSTALL file
- #
- #rm -f /usr/include/asm
- #ln -s /usr/src/linux/include/asm-i386 /usr/include/asm
- #
- #ln -s /usr/lib/g++-include /usr/include/g++
- #
- # May be it works with other distributions too
-
- # set some variables
- PTOLEMY=/users/ptolemy
- OCTTOOLS=$PTOLEMY/octtools
- PTARCH=linux
- PATH=$PTOLEMY/bin:$PTOLEMY/bin.${PTARCH}:$OCTTOOLS/bin.${PTARCH}:${PATH}
- export PTOLEMY OCTTOOLS PTARCH PATH
-
- # this should point to where your Ptolemy archives are :
-
- # EDIT THIS !
- TarDir=/var/tmp
-
- # Unpack and untar files
- cd $PTOLEMY/..
- tar -xzf $TarDir/pt-0.6.src.tar.gz
- tar -xzf $TarDir/pt-0.6.other.src.tar.gz
-
- # Apply the appropriate patch for the config-linux.mk file
- cd $PTOLEMY
- gzip -cd $TarDir/pt-0.6.linux-dynamic-patch1.gz|patch -p2
- #gzip -cd $TarDir/pt-0.6.linux-static-patch1.gz|patch -p2
-
- # now start building
- cd $PTOLEMY
- make obj.$PTARCH >make.log 2>&1
- make install_tcltk >>make.log 2>&1
- make install_octtools >>make.log 2>&1
- make install_gthreads >>make.log 2>&1
-
- # and now fiddle around to make gmake happy
- cd obj.linux/ptcl
-
- # create a dummy file to prevent make from sisegv'ing or aborting
- # may be you'll need to create more dummy files
- touch makefile.0
-
- # this is for the second bug (otherwise make complains about a missing rule)
- make libptcl.so >>$PTOLEMY/make.log 2>&1
- cd ../..
-
- # and now continue the normal way
- make install >>make.log 2>&1
-
- # make xv accessible
- cd bin.linux
- ln -s /usr/X11/bin/xv .
-